import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [

                {
                    path: '/integration',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/integration.vue'),
                    meta: { title: '会员积分' }
                },
                {
                    path: '/level',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/level.vue'),
                    meta: { title: '会员等级' }
                },
                {
                    path: '/client',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/client.vue'),
                    meta: { title: '会员管理' }
                }, {
                    path: '/operLog',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/operLog.vue'),
                    meta: { title: '日志记录' }
                }, {
                    path: '/operLogTj',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Logtongji.vue'),
                    meta: { title: '日志统计' }
                },{
                    path: '/user',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/user.vue'),
                    meta: { title: '用户管理' }
                },{
                    path: '/role',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/role.vue'),
                    meta: { title: '角色管理' }
                },{
                    path: '/menu',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/menu.vue'),
                    meta: { title: '菜单管理' }
                },{
                    path: '/carinsurance',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/carinsurance.vue'),
                    meta: { title: '车辆保险' }
                },{
                    path: '/carrecord',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/carrecord.vue'),
                    meta: { title: '维修记录' }
                },{
                    path: '/carviolation',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/carviolation.vue'),
                    meta: { title: '违章记录' }
                },{
                    path: '/recordshop',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/recordshop.vue'),
                    meta: { title: '维修厂' }
                },{
                    path: '/dict',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dict.vue'),
                    meta: { title: '数据字典' }
                },
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: 'tab选项卡' }
                },
                {
                    // vue-schart组件
                    path: '/charts',
                    component: () => import(/* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
                    meta: { title: 'schart图表' }
                },
                {
                    // 拖拽列表组件
                    path: '/drag',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
                    meta: { title: '拖拽列表' }
                },
                {
                    // 拖拽Dialog组件
                    path: '/dialog',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
                    meta: { title: '拖拽弹框' }
                },
                {
                    // 国际化组件
                    path: '/i18n',
                    component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
                    meta: { title: '国际化' }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import( '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/wenda',
                    component: () => import( '../components/page/wenda.vue'),
                    meta: { title: '客服问答' }
                },
                {
                    path: '/integral',
                    component: () => import( '../components/page/integral.vue'),
                    meta: { title: '积分历史' }
                },
                {
                    path: '/dengji',
                    component: () => import( '../components/page/dengji.vue'),
                    meta: { title: '会员等级' }
                },
                {
                    path: '/coupon',
                    component: () => import( '../components/page/coupon.vue'),
                    meta: { title: '优惠券' }
                },
                {
                    path: '/advertise',
                    component: () => import( '../components/page/advertise.vue'),
                    meta: { title: '广告' }
                },
                {
                    path: '/carbrand',
                    component: () => import( '../components/page/carbrand.vue'),
                    meta: { title: '汽车品牌' }
                },
                {
                    path: '/carcompany',
                    component: () => import( '../components/page/carcompany.vue'),
                    meta: { title: '租车公司' }
                },
                {
                    path: '/carconfig',
                    component: () => import( '../components/page/carconfig.vue'),
                    meta: { title: '汽车配置' }
                },
                {
                    path: '/carpage',
                    component: () => import( '../components/page/carpage.vue'),
                    meta: { title: '汽车' }
                },
                {
                    path: '/cartype',
                    component: () => import( '../components/page/cartype.vue'),
                    meta: { title: '汽车类型' }
                },
			    {
                    path: '/address',
                    component: () => import( '../components/page/address.vue'),
                    meta: { title: '常用地址' }
                },{
                    path: '/customer',
                    component: () => import( '../components/page/customer.vue'),
                    meta: { title: '常用租车人' }
                },{
                    path: '/passenger',
                    component: () => import( '../components/page/passenger.vue'),
                    meta: { title: '常用乘客' }
                },{
                    path: '/receiver',
                    component: () => import( '../components/page/receiver.vue'),
                    meta: { title: '常用收件信息' }
                },{
                    path: '/statement',
                    component: () => import( '../components/page/statement.vue'),
                    meta: { title: '账户流水' }
                },{
                    path: '/shop',
                    component: () => import( '../components/page/shop.vue'),
                    meta: { title: '代理门店' }
                },{
                    path: '/LoginTongji',
                    component: () => import( '../components/page/LoginTongji.vue'),
                    meta: { title: '登录统计' }
                },{
                    path: '/incomeRecord',
                    component: () => import( '../components/page/incomeRecord.vue'),
                    meta: { title: '收入统计' }
                },
                {
                    path: '/advertiseposition',
                    component: () => import( '../components/page/advertiseposition.vue'),
                    meta: { title: '广告位置' }
                },{
                    path: '/order',
                    component: () => import( '../components/page/Order.vue'),
                    meta: { title: '订单管理' }
                },{
                    path: '/couponHistroy',
                    component: () => import( '../components/page/couponHistroy.vue'),
                    meta: { title: '订单管理' }
                },

            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
